package com.limf.demo.pattern.singleton;

// 饱汉
// UnThreadSafe
public class Singleton1 {

	private static Singleton1 singleton1 = null;
	
	private Singleton1() {}
	
	public static Singleton1 getInstance() {
		if(singleton1 == null) {
			return new Singleton1();
		}
		return singleton1;
	}
}
